package com.no1.zy.rabbitmq.topic;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "my_topic_q1")
public class TopicConsumer1 {
    @RabbitHandler
    public void process(String msg) {
        System.out.println("消费者1：接收 msg -> " + msg);
    }
}
